<template>
	<view style="background-color: #F7F7F9;">
		<view class="elm"
			style="height: 200rpx;width: 750rpx;border-bottom-left-radius: 35rpx;border-bottom-right-radius: 35rpx;">
			<view class="flex j-b a-c f28 cff" style="padding-left: 50rpx;padding-right: 50rpx;padding-top: 25rpx;">
			</view>
		</view>
		<view class="p20" style="margin-top: -120rpx;">
			<view class=" p20" style="background-color: #fff;border-radius: 35rpx;">
				<view class="flex" style="justify-content:center;">
					<view style="width:200rpx;height:200rpx;">
						<image style="height:100%;width:100%;" class="b_y" :src="item.pic"></image>
					</view>
				</view>
			</view>
		</view>
		<view class="hengxian" style="height: 10rpx;"></view>
		<view  style="position: -webkit-sticky; position: sticky;top: 0px;background-color: #fff;z-index: 10;">
			<view class="p20 flex a-c" style="background-color: #fff;">
				<view @click="ontab(0)" :class="tabIndex== 0? 'isxz' : 'iswxz'" class="ml20 ">
					<text class="f34">商家信息</text>
				</view>
			</view>
		</view>
		<view class="hengxian" style="height: 5rpx;"></view>
		<view style="background-color: #fff;">
			<view class="page bg-white b_y">
				<view style="margin: auto 40rpx;">
					<view class="f-d bg-white p20 a-c bb" style="padding-top: 40rpx;padding-bottom: 40rpx;display: flex;">
						<view style="width: 180rpx;" class="  c_pl">
							<text class="f28 c_z">商家名称:</text>
						</view>
						<view class="f28 in">{{item.name}}</view>
					</view>
					<view class="f-d bg-white p20 a-c bb" style="padding-top: 40rpx;padding-bottom: 40rpx;display: flex;">
						<view style="width: 180rpx;" class="  c_pl">
							<text class="f28 c_z">商家地址:</text>
						</view>
						<view class="f28 in">{{item.address}}</view>
					</view>
					<view class="f-d  bg-white p20 a-c bb" style="padding-top: 40rpx;padding-bottom: 40rpx;">
						<view class="f28 c_pl" style="width: 180rpx;">
							<text class="f28 c_z">商户手机号:</text>
						</view>
						<view class="f28 in">{{item.mobile}}</view>
					</view>
					<view class="f-d  bg-white p20 a-c bb" style="padding-top: 40rpx;padding-bottom: 40rpx;">
						<view class="f28 c_pl" style="width: 180rpx;">
							<text class="f28 c_z">美团链接:</text>
						</view>
						<view class="f28 in">{{item.meituan}}</view>
					</view>
					<view class="f-d  bg-white p20 a-c bb" style="padding-top: 40rpx;padding-bottom: 40rpx;">
						<view class="f28 c_pl" style="width: 180rpx;">
							<text class="f28 c_z">饿了么链接:</text>
						</view>
						<view class="f28 in">{{item.elem}}</view>
					</view>
				</view>
			</view>
		</view>

		<view style="height: 130rpx;"></view>
		<view class="dibu" style="height: 140rpx;">
			<view class="p10 flex ">
				<view class="flex j-s p10" style="width: 100%;display: flex;justify-content: space-between;">
					<view @click="on_tel(2)" class="flex a-c j-c b_y f800 f28 cff"
						style="flex: 1;margin-right: 20rpx;height: 100rpx;background-color: #ff0000;">
						<text>不通过</text>
					</view>
					<view @click="on_tel(1)" class="flex a-c j-c b_y f800 f28 cff"
						style="flex:1;height: 100rpx;background-color: #0071FE;">
						<text>审核通过</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import {
		params
	} from '@/common/time_list.js';
	import LbPicker from '@/common/lb-picker';
	export default {
		components: {
			// sete,
			LbPicker
		},
		data() {
			return {
				item: {},
			}
		},
		onShow() {
			// 判断是否登录
			this.$module.ifToken(res => {
				if (res == 1) {
					this.$module.navigateTo('/pages/banmi/user_login')
				} else {
					this.$module.getNowFormatDates(res => {
						this.day = res
					})
					return
				}
			})
		},
		onLoad(options) {
			this.item = JSON.parse(options.item)
			console.log(this.item)
		},

		methods: {
			on_tel(i) { //调用接口
				const that = this
				this.item.status = i
				let date = {
					data: ''
				}
				that.$module.sm(this.item, 1, res => {
					date.data = res
				})
				uni.showModal({
					title: '',
					content: '是否确认操作',
					confirmText: '确认',
					success: function(res) {
						if (res.confirm){
							that.$module.showLoading('操作中')
							that.Htpp.post('/mehrb/meplus/business/auditBussiness',
								'app', {
									token: true,
									datalist: date
								}).then(ret => {
								that.$module.sm(ret, 2, res => {
									that.$module.switchTab('/pages/index/index')
								})
							})
						}
					}
				});
			},


			ontab(index) {
				this.tabIndex = index;
			},

		},
		onNavigationBarButtonTap(e) {

		}
	}
</script>

<style scoped>
	.mt {
		background-color: #FDC400;
	}

	.elm {
		background-color: #0192FF;
	}

	.c_pl {
		margin-right: 20rpx;
	}

	.fk_img {
		margin-right: -10rpx;
	}

	.dibu {
		position: fixed;
		bottom: 0;
		background-color: #FFFFFF;
		height: 120rpx;
		width: 100%;
		border-top: solid 1rpx #f2f2f2;
	}

	.isxz {
		border-bottom: solid 8rpx #FFD821;
		height: 45rpx;
		font-weight: 800;
		padding-bottom: 50rpx;
	}

	.iswxz {
		padding-bottom: 50rpx;
		border-bottom: solid 8rpx #fff;
		height: 45rpx;
		color: #767676;
		font-weight: 800;
	}
</style>